<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'show.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<%@include file="/WEB-INF/jsp/public/commons.jspf"%>
		<link rel="stylesheet" type="text/css"
			href="<%=path%>/css/knowledgeShow.css">
			<SCRIPT type="text/javascript">
			function expend(){
				$('#lay').layout('expand', 'east');
			}
				
			</SCRIPT>
	</head>

	<body>
		<div id="lay" class="easyui-layout" style="width: 100%; height: 100%">
			<div region="center" style="border: 0" class="center">
				<div class="leftDiv">
					<div class="h1 ">
						${model.name}
						<span> 
							<s:if test="#session.peopleFlag==1 || #session.peopleFlag==4">
						<a href="javascript:void(0);"
							class="easyui-linkbutton"
							onclick="parent.addWind('kpoint_editUI.action?model.id=${model.id}','修改知识点');">编辑</a>
							</s:if>
						</span>
					</div>
					<div class="clear"></div>
					<span class="h3">分类：${model.navigation.name}</span>
					<!-- 定义 -->
					<div class="clear"></div>
					<div class="h2">
						<span class="headline_index">1</span>定义
					</div>
					<div class="clear"></div>
					<div class="">
						${model.definition}
					</div>
					<!-- 详细描述 -->
					<div class="clear"></div>
					<div class="h2">
						<span class="headline_index">2</span>详细描述
						<span></span>
					</div>
					<div class="clear"></div>
					<div class="">
						${model.description}
					</div>
					<!-- 课程相关 -->
					<div class="clear"></div>
					<div class="h2">
						<span class="headline_index">3</span>学习帮助
						<span></span>
					</div>
					<div class="clear"></div>
					<span>学习难度：</span><span><s:if test="model.defficulty==1">非常简单</s:if>
						<s:if test="model.defficulty==2">简单</s:if> <s:if
							test="model.defficulty==3">中等</s:if> <s:if
							test="model.defficulty==4">困难</s:if> <s:if
							test="model.defficulty==5">非常困难</s:if> </span>
					<div class="clear"></div>
					<span>学习目标：</span><span> <s:if test="model.goal==1">了解</s:if>
						<s:if test="model.goal==2">掌握</s:if> <s:if test="model.goal==3">应用</s:if>
					</span>
					<div class="clear"></div>
					<span>推荐学时：</span><span>${model.period}</span>
					<!--参考资料-->
					<div class="clear"></div>
					<div class="h2">
						<span class="headline_index">4</span>参考资料
						<span></span>
					</div>
					<div class="clear"></div>
					<s:iterator value="model.references" var="ref">
						<span>${ref.referenceType.name}：</span>
						<span><a href="${ref.url}" class="aa">${ref.name}</a> </span>
						<div class="clear"></div>
					</s:iterator>
				</div>
				<!-- 右部 -->
				<div class="rightDiv">
					<!-- 知识点的前导知识-->
					<div class="box">
						<div class="rightHead">
							<span>前导知识点</span>
						</div>

						<s:iterator value="model.preKnowledges" var="prek">
							<div class="item">
								<a href="kpoint_show.action?model.id=${prek.id}" class=""
									target="_self"> ${prek.name}</a>
							</div>
						</s:iterator>
					</div>
					<!-- 知识点的后继知识-->
					<div class="box">
						<div class="rightHead">
							<span>后继知识点</span>
						</div>

						<s:iterator value="model.nextKnowledges" var="nextk">
							<div class="item">
								<a href="kpoint_show.action?model.id=${nextk.id}" class="aa"
									target="_self"> ${nextk.name}</a>
							</div>
						</s:iterator>
					</div>
					
					<!-- 知识点的父类知识-->
					<div class="box">
						<div class="rightHead">
							<span>父类知识点</span>
						</div>

						<s:iterator value="model.parentKnowledges" var="parentk">
							<div class="item">
								<a href="kpoint_show.action?model.id=${parentk.id}" class="aa"
									target="_self"> ${parentk.name}</a>
							</div>
						</s:iterator>
					</div>
					
					<!-- 知识点的子类知识-->
					<div class="box">
						<div class="rightHead">
							<span>子类知识点</span>
						</div>

						<s:iterator value="model.chileKnowledges" var="chilek">
							<div class="item">
								<a href="kpoint_show.action?model.id=${chilek.id}" class="aa"
									target="_self"> ${chilek.name}</a>
							</div>
						</s:iterator>
					</div>
					<!-- 知识点历史记录 -->
					<div class="box">
						<div class="rightHead">
							<span>知识点统计</span>
						</div>
						<div class="item">
							编辑次数：
							<span>${editTimes}</span>次
							<a class="aa" target="_blank" onclick="expend();"> 修改记录</a>
						</div>
						<div class="item">
							最近更新：${resentTime}
						</div>
						<div class="item">
							创建者：${creater}
						</div>

					</div>
				</div>
			</div>

			<div region="east" collapsed=true iconCls="icon-reload" title="修改记录"
				split="true" style="width: 300px;" >
					
					<table style="border-top:1px solid #E4E4E4;border-bottom: 1px solid #E4E4E4">
						<tr>
							<th width="60px">操作</th>
							<th width="100px">跟新时间</th>
							<th width="100px">贡献者</th>
						</tr>
						
						<s:iterator value="model.knowledgeLogs" var="kl">
							<tr style="border-bottom: 1px dotted #ECECEC;line-height: 28px;background-color: #FFF;">
								<td >${kl.actionType}</td>
								<td>${fn:substring(actionTime,0,10)}</td>
								<td>${people.name}</td>
							</tr>
						</s:iterator>
					</table>
				
				
				
			</div>
		</div>
	</body>
</html>
